fix: 尊重 perf report 的自定义配置目录#1312
Open
liuCodeBoy wants to merge 1 commit into
Open
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe perf issue command now writes snapshot reports to ChangesPerf report storage
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
/perf-issue的会话转录路径已经通过getClaudeConfigHomeDir()尊重CLAUDE_CONFIG_DIR,但报告输出目录仍硬编码为~/.claude/perf-reports。这会破坏自定义配置目录的隔离,在 home 目录只读时也可能导致写入失败。现有测试使用临时
CLAUDE_CONFIG_DIR;基线实现会将报告写到真实 home,因而有 5 个用例失败。修改
将报告目录改为
<Claude config dir>/perf-reports,与转录、设置和其他配置数据使用相同的目录解析逻辑。未设置CLAUDE_CONFIG_DIR时仍保持原有的~/.claude/perf-reports行为。验证
bun test src/commands/perf-issue/__tests__/perf-issue.test.ts:16 pass / 0 failbun run typecheck通过bunx biome ci .通过bun run precheck:5984 pass / 10 skip / 0 failbun run build:vite通过git diff --check通过Summary by CodeRabbit